package y_2025.m03.d08.t03;

public class ForSum {
    public static void main(String[] args) {
        long sum = 0, term = 0;
        for (int i = 0; i < 10; i++) {
            term = term * 10 + 8; // 生成当前项
            sum += term;          // 累加到总和
        }
        System.out.println("前十项和为：" + sum);
    }
}